package com.gakj.truck.third.core.enums;

/**
 * 平台
 * Created by gc on 2016/6/30.
 */
public enum EnumPlatform {

    IOS("1","ios"),ANDRIOD("2","andriod"),SNAIL_BACK("3","蜗牛后台"),ZQWX("4","重汽微信"),WNWX("5","蜗牛微信"),ZQ_BACK("6","重汽后台"),DATA_OUMAN("7","欧曼"),
    SOURCE_HUATONG("9","华通");


    private String code;
    private String name;

    private EnumPlatform(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static EnumPlatform getEnum(String value) {
        for (EnumPlatform e : EnumPlatform.values()) {
            if (value.equals(e.getCode())) {
                return e;
            }
        }
        return SNAIL_BACK;
    }
}
